package BO;

import UI.*;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.persistence.*;

public class Service {
   

    public Service() {
    }
    
    public static boolean removeFriendship(int req, int rec) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.removeFriendship(req, rec);
    }

    public static boolean addFriendship(int requestId, int reciverId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.addFriendship(requestId, reciverId);
    }

    public static boolean addInterest(int userId, java.lang.String interestName) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.addInterest(userId, interestName);
    }

    public static boolean addStatusMessage(int id, java.lang.String statusMessage) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.addStatusMessage(id, statusMessage);
    }

    public static boolean createChatMessage(int chatId, java.lang.String message, int userId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.createChatMessage(chatId, message, userId);
    }

    public static ws.ChatUI getChatByID(int chatId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getChatByID(chatId);
    }

    public static java.util.List<ws.StatusUI> getFriendStatusUpdates(int requestId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getFriendStatusUpdates(requestId);
    }

    public static java.util.List<ws.Pmui> getReceivedpublicMessages(ws.UserUI user) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getReceivedpublicMessages(user);
    }

    public static java.util.List<ws.Pmui> getSentpublicMessages(ws.UserUI user) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getSentpublicMessages(user);
    }

    public static java.util.List<ws.StatusUI> getStatusUpdates(int id) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getStatusUpdates(id);
    }

    public static ws.UserUI getUser(int id) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getUser(id);
    }

    public static java.util.List<ws.UserUI> getUserFriends(int userId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getUserFriends(userId);
    }

    public static java.util.List<ws.InterestUI> getUserInterests(int userId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getUserInterests(userId);
    }

    public static java.util.List<java.lang.String> getUserNamesLike(java.lang.String query) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.getUserNamesLike(query);
    }

    public static ws.UserUI registerUser(java.lang.String name, java.lang.String email, java.lang.String password) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.registerUser(name, email, password);
    }

    public static java.util.List<ws.UserUI> searchAfterUser(java.lang.String chatId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.searchAfterUser(chatId);
    }

    public static boolean sendpublicMessage(java.lang.String receivername, java.lang.String message, int senderId) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.sendpublicMessage(receivername, message, senderId);
    }

    public static ws.UserUI validateUser(java.lang.String name, java.lang.String password) {
        ws.RoMaWebService_Service service = new ws.RoMaWebService_Service();
        ws.RoMaWebService port = service.getRoMaWebServicePort();
        return port.validateUser(name, password);
    }
    
    
    
    
}
